package com.tengju.user.infrastructure.persistence.mybatis.mapper.dealer.custom;

import com.tengju.user.infrastructure.persistence.mybatis.dataobject.ChiefGenSecRelationDO;
import com.tengju.user.infrastructure.persistence.mybatis.dataobject.ChiefSecCountDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ChiefGenSecRelationDOMapper {

    List<ChiefGenSecRelationDO> queryByChiefId(@Param("chiefId") long chiefId);

    void batchInsert(@Param("chiefGenSecRelationDOList") List<ChiefGenSecRelationDO> chiefGenSecRelationDOList);

    int batchRemove(@Param("chiefId") long chiefId);

    List<ChiefSecCountDO> queryByChiefIdAndSecId(@Param("chiefId") Long chiefId, @Param("genSecId") Long genSecId, @Param("offset") int offset, @Param("pageSize") int pageSize);

    int count(@Param("chiefId") Long chiefId, @Param("genSecId") Long genSecId);

    List<Long> queryGenSecIdCodeList(@Param("chiefId") long chiefId);

    List<Long> chiefIdList();

    void updateChiefDepartmentRelation(@Param("relationDO") ChiefGenSecRelationDO relationDO);

    List<ChiefGenSecRelationDO> selectRelationsBySecsDepartments(@Param("secIds") List<Long> secIdList, @Param("departmentIds") List<Long> departmentIdList);

}